<?php

	class Smajax extends _obhandler{
			
		var $headers = array(
			'Content-type'=>'application/x-javascript'
		);	
			
		var $js = '';
		
		function jsln($s){
			$this->js .= $s;	
		}
		
		function handle_ob(){
			if(!$this->ob = trim($this->ob)) return;
			$this->ob = 'justsay('.json_encode($this->ob).');';
		}
		
		function handle_js(){
			$this->ln($this->js);
		}
			
		function flush(){
			$this->put_headers();
			$this->scrape_php_buffer();
			$this->handle_ob();
			$this->handle_js();
			parent::flush();
		}
		
		function report_error($e){}
			
	}


